import mixins from '../mixins';
Component({
  mixins: [mixins],
  data: {
    show: true
  },
  props: {},
  didMount() {
    this.setData({
      item: this.props.data
    })
  },
  didUpdate(prevProps) {
    if (prevProps.data != this.props.data) {
      this.setData({
        item: this.props.data,
      })
    }
  },
  didUnmount() { },
  methods: {
    _show(){
      alert(1)
    },
    // 修改图片地址
    setSrc(_src){
      const {item} = this.data;
      this.setData({
        item: {...item,src:_src}
      })
    }
  },
});
